﻿using adb;
using Chinese;
using System;
using System.Collections.Generic;

namespace PowerStation
{
    public class AreaCheckAndRetrun
    {
        public static string AreaCheck4Retrun(tKey tKey)
        {
            long AreaId = tKey.keyId;
            int check1 = QuHouZhuiList.IndexOf(AreaId);
            int check2 = JianXieList.IndexOf(AreaId);
            int check4 = QiTaPingYinList.IndexOf(AreaId);
            if (check4 != -1)
            {
                string AreaName = QiTaPingYinNameList[check4];
                return AreaName;

            }
            else if (check1 != -1)
            {
                string AreaName = tKey.keyName.Replace(QuHouZhuiNameList[check1], "");
                AreaName = Pinyin.GetString(AreaName, PinyinFormat.WithoutTone).Replace(" ", "");
                return AreaName;
            }
            else if (check2 != -1)
            {
                string AreaName = JianXieNameList[check2];
                AreaName = Pinyin.GetString(AreaName, PinyinFormat.WithoutTone).Replace(" ", "");
                return AreaName;
            }

            else
            {
                string AreaName = tKey.keyName;
                if (tKey.keyName.Length > 2)
                {
                    AreaName = tKey.keyName.Replace("县", "").Replace("市", "").Replace("区", "");
                }
                AreaName = Pinyin.GetString(AreaName, PinyinFormat.WithoutTone).Replace(" ", "");
                return AreaName;
            }
        }

        private static List<long> QuHouZhuiList = new List<long>() { 210624, 152522, 130827, 130826, 130828, 152527, 130321, 210323, 131028, 150426, 152923, 210522, 210521, 450332, 451228, 150425, 451229, 150622, 451227, 150428, 150621, 431129, 220323, 150627, 150624, 469028, 441826, 469027, 469026, 469025, 441825, 210921, 440232, 130930, 210423, 210422, 451123, 431230, 431228, 451324, 431229, 150526, 431226, 431227 };
        private static List<string> QuHouZhuiNameList = new List<string>() { "满族自治县", "旗", "满族自治县", "满族自治县", "满族蒙古族自治县", "旗", "满族自治县", "满族自治县", "回族自治县", "旗", "旗", "满族自治县", "满族自治县", "瑶族自治县", "瑶族自治县", "旗", "瑶族自治县", "旗", "瑶族自治县", "旗", "旗", "瑶族自治县", "满族自治县", "旗", "旗", "黎族自治县", "瑶族自治县", "黎族自治县", "黎族自治县", "黎族自治县", "瑶族自治县", "蒙古族自治县", "瑶族自治县", "回族自治县", "满族自治县", "满族自治县", "瑶族自治县", "侗族自治县", "侗族自治县", "瑶族自治县", "侗族自治县", "旗", "苗族自治县", "侗族自治县" };
        private static List<long> JianXieList = new List<long>() { 652800, 150926, 150927, 650521, 150928, 513300, 652826, 652700, 422800, 150421, 653200, 654226, 152222, 810000, 152221, 632726, 652328, 540202, 150823, 653100, 210212, 150824, 652323, 150825, 820000, 652324, 652327, 220721, 360113, 152500, 513200, 150203, 654000, 522300, 150206, 150722, 150723, 653000, 653131, 230208, 150726, 150727, 150724, 230725, 622927, 150725, 430529, 532800, 659010, 152523, 522700, 152526, 220623, 150223, 152524, 150221, 152525, 654022, 654300, 152922, 152921, 429021, 150623, 230624, 620525, 130406, 150122, 150123, 150121, 652900, 522600, 654200, 620924, 150522, 150521, 211324, 232700, 622921, 650121, 210113, 652301, 532301, 610828, 152900, 513231, 511181, 430602, 610628, 140108, 650200, 650203, 150929, 152529, 610330, 150422, 150423, 610327, 610326, 310115, 150826, 610723, 610725, 652901, 654201, 532601, 610424, 120116, 513328, 532529, 130107, 622901, 530824, 510726, 520326, 530825, 632200, 520325, 530826, 530827, 530828, 530829, 652300, 513422, 520203, 530821, 632324, 530822, 530823, 533400, 623000, 632600, 500243, 632221, 500242, 500241, 500240, 511133, 511132, 451226, 532500, 450328, 451225, 469030, 469029, 532523, 533423, 520622, 530721, 530724, 542500, 532922, 520628, 450226, 520627, 420528, 520625, 532926, 420529, 450225, 532927, 620721, 532530, 532532, 533300, 622900, 532300, 533324, 533325, 530126, 620623, 630223, 622926, 630222, 520526, 433100, 451031, 530128, 630225, 530129, 630224, 410203, 520423, 630121, 533100, 530925, 632300, 530926, 530927, 632800, 522732, 520425, 520424, 532600, 530426, 620923, 530427, 530428, 632700, 410104, };
        private static List<string> JianXieNameList = new List<string>() { "巴音郭楞", "察右前旗", "察右中旗", "巴里坤", "察右后旗", "甘孜", "焉耆", "博尔塔拉", "恩施", "阿鲁旗", "和田", "和布克赛尔", "科右中旗", "香港", "科右前旗", "曲麻莱", "木垒", "日喀则", "乌前旗", "喀什", "旅顺", "乌中旗", "呼图壁", "乌后旗", "澳门", "玛纳斯", "吉木萨尔", "前郭", "南昌县", "锡林郭勒", "阿坝", "包头", "伊犁", "黔西南", "白云鄂博", "莫力达瓦", "鄂伦春旗", "克孜勒", "塔什库尔干", "梅里斯", "新左旗", "新右旗", "鄂温克旗", "带岭", "积石山", "陈旗", "城步", "西双版纳", "阿勒泰", "苏左旗", "黔南", "西乌旗", "长白", "达茂旗", "苏右旗", "土右旗", "东乌旗", "察布查尔", "阿勒泰", "阿右旗", "阿左旗", "神农架", "鄂前旗", "杜尔伯特", "张家川", "峰峰", "托县", "和林", "土左旗", "阿克苏", "黔东南", "塔城", "阿克塞", "科左后旗", "科左中旗", "喀左", "大兴安岭", "临夏县", "乌鲁木齐县", "沈北新区", "昌吉市", "楚雄市", "佳县", "阿拉善盟", "阿坝县", "峨眉山市", "岳阳楼区", "富县", "尖草坪区", "克拉玛依市", "克拉玛依区", "四子王旗", "正镶白旗", "凤县", "巴林左旗", "巴林右旗", "陇县", "眉县", "浦东新区", "杭锦后旗", "洋县", "勉县", "阿克苏市", "塔城市", "文山市", "乾县", "滨海新区", "甘孜县", "红河县", "井陉矿区", "临夏市", "景谷", "北川", "务川", "镇沅", "海北", "道真", "江城", "孟连", "澜沧", "西盟", "昌吉", "木里", "六枝", "宁洱", "河南", "墨江", "景东", "迪庆", "甘南", "果洛", "彭水", "门源", "酉阳", "秀山", "石柱", "马边", "峨边", "环江", "红河", "龙胜", "罗城", "琼中", "保亭", "屏边", "维西", "玉屏", "玉龙", "宁蒗", "阿里", "漾濞", "松桃", "三江", "沿河", "长阳", "印江", "南涧", "五峰", "融水", "巍山", "肃南", "金平", "河口", "怒江", "临夏", "楚雄", "贡山", "兰坪", "石林", "天祝", "互助", "东乡", "民和", "威宁", "湘西", "隆林", "禄劝", "循化", "寻甸", "化隆", "顺河", "镇宁", "大通", "德宏", "双江", "黄南", "耿马", "沧源", "海西", "三都", "紫云", "关岭", "文山", "峨山", "肃北", "新平", "元江", "玉树", "管城", };
        private static List<long> QiTaPingYinList = new List<long>() { 331127, 654301, 410304, 422801, 513400, 360726, 360302, 131081, 511902, 530524, 430482, 110105, 220104, 220104, 211300, 211321, 440513, 532901, 610523, 140200, 230606, 340402, 441226, 330521, 370500, 370502, 141128, 110111, 110106, 340421, 131128, 510703, 320923, 532628, 130624, 610528, 370611, 141027, 210400, 210421, 510322, 341200, 230227, 530325, 361000, 350100, 360700, 620702, 131126, 420625, 640400, 130724, 520100, 431021, 330424, 632223, 430423, 230303, 320800, 130728, 410782, 621227, 441300, 341004, 141028, 220582, 360800, 370800, 230300, 341824, 610828, 410425, 510185, 350703, 210700, 130183, 210213, 310106, 360925, 620826, 341823, 131127, 610423, 510603, 421000, 532502, 211282, 371302, 371103, 330781, 231222, 361022, 422802, 331100, 513222, 430723, 130635, 621226, 440881, 350122, 370832, 371300, 140821, 410581, 540121, 140524, 450323, 441622, 533124, 621200, 410423, 511826, 532527, 433122, 441581, 532331, 450124, 230307, 610326, 441403, 500108, 350583, 320100, 350627, 140829, 140603, 450821, 350923, 130131, 210502, 511529, 360300, 451481, 130532, 350722, 610526, 510131, 330726, 320681, 430426, 140727, 410622, 210311, 130283, 220723, 500114, 429005, 520522, 130227, 450700, 620502, 621000, 341723, 130534, 654325, 360803, 441800, 130435, 330800, 450324, 350500, 445202, 371082, 130629, 210402, 140902, 510321, 450921, 350403, 610422, 341021, 130426, 320500, 341300, 620902, 430527, 510900, 320324, 340621, 440823, 520323, 411403, 210321, 370900, 370902, 440781, 341222, 210711, 360826, 331000, 321200, 522627, 340881, 421222, 230881, 511921, 421224, 370826, 130533, 130434, 511024, 621123, 410825, 621222, 440883, 150125, 430581, 410481, 500237, 620524, 620600, 320200, 500238, 330723, 131122, 150821, 361130, 621002, 211223, 621225, 210911, 330106, 360103, 210503, 320205, 530112, 411528, 141031, 513336, 350602, 411681, 411025, 420602, 320507, 340603, 450304, 652925, 130530, 360722, 440233, 440983, 320381, 140900, 361102, 420117, 510422, 320900, 411103, 411024, 430225, 130925, 532622, 361124, 371622, 420222, 410329, 610630, 230700, 360900, 330782, 650522, 210727, 130633, 341023, 410327, 430900, 361126, 211202, 330212, 421124, 511322, 140881, 220221, 640121, 450900, 610800, 361123, 340504, 220182, 653226, 130229, 500103, 620123, 371482, 411425, 140322, 130726, 430981, 532528, 410725, 140800, 371725, 445302, 210604, 611025, 321100, 440204, 411324, 610927, 621027, 522625, 420583, 442000, 210202, 451122, 520201, 512000, 430902, 610924, 320113, 370686, };
        private static List<string> QiTaPingYinNameList = new List<string>() { "jingning1", "altay", "chanhe", "enshi2", "liangshan1", "anyuanxian", "anyuan", "bazhou", "bazhouqu", "changning", "changningshi", "chaoyang", "chaoyang", "chaoyangzhen", "chaoyangshi", "chaoyangxian", "guangdongchaoyang", "dalishi", "dalixian", "datong", "datongqu", "datongzhen", "deqing", "deqingxian", "dongying", "dongyingqu", "fangshan1", "fangshan", "fengtai", "fengtai1", "fucheng", "fucheng1", "funing2", "funing1", "fuping", "fuping1", "fushan1", "fushan", "fushun", "fushunxian", "fushun1", "fuyang1", "fuyu", "fuyuan1", "fuzhou1", "fuzhou", "ganzhou1", "ganzhou", "gucheng", "gucheng2", "guyuan1", "guyuan", "guiyang1", "guiyang", "haiyan1", "haiyan", "hengshan1", "hengshan", "huaian1", "huaian", "huixian1", "huixian", "huizhou1", "huizhou", "jixian1", "jian", "jian1", "jining1", "jixi", "jixi1", "jiaxian", "jiaxian1", "jianyang1", "jianyang", "jinzhou2", "jinzhou1", "jinzhou", "jingan", "jingan1", "jingning", "jingxian1", "jingxian", "jingyang", "jingyang1", "jingzhou", "kaiyuan1", "kaiyuan", "lanshan", "lanshan2", "lanxi1", "lanxi", "lichuan1", "lichuan", "lishui1", "lixian1", "lixian2", "lixian", "lixian3", "lianjiang1", "lianjiang", "liangshan", "linyi1", "linyi", "linzhou1", "linzhou", "lingchuan", "lingchuan1", "longchuan", "longchuan1", "longnan", "lushan", "lushan1", "luxi1", "luxi2", "lufeng", "lufeng1", "mashan1", "mashan", "meixian", "meixian1", "nanan", "nanan1", "nanjing", "nanjing1", "pinglu", "pinglu1", "pingnan1", "pingnan", "pingshan2", "pingshan", "pingshan1", "pingxiang2", "pingxiang1", "pingxiang", "pucheng1", "pucheng", "pujiang1", "pujiang", "qidong", "qidong1", "qixian", "qixian1", "qianshan", "qianan1", "qianan", "qianjiang", "qianjiang1", "qianxi1", "qianxi", "qinzhou1", "qianzhou", "qingyang", "qingyang2", "qinghe3", "qinghe2", "qingyuan2", "qingyuan1", "quzhou", "quzhou1", "quanzhou1", "quanzhou", "rongcheng1", "rongcheng2", "rongcheng", "xinfu", "xinfu1", "rongxian", "rongxian1", "sanyuan1", "sanyuan", "shexian1", "shexian", "suzhou2", "suzhou1", "suzhou", "suining2", "suining1", "suining", "suixi", "suixi1", "suiyang1", "suiyang", "taian", "taian1", "taishan", "taishan1", "taihe2", "taihe", "taihe1", "taizhou1", "taizhou", "tianzhu1", "tongcehng1", "tongcheng", "tongjiang", "tongjiang1", "tongshan1", "weishan", "weixian", "weixian1", "weiyuan1", "weiyuan", "wenxian1", "wenxian", "wuchuan1", "wuchuan", "wugang1", "wugang", "wushan", "wushan1", "wuwei", "wuxi1", "wuxi", "wuyi1", "wuyi", "wuyuan", "wuyuan1", "xifeng2", "xifeng", "xihe1", "xihe", "xihu2", "xihu2", "xihu", "xishan", "xishan1", "xixian1", "xixian", "xiangcheng1", "xiangcheng2", "xiangcheng", "xiangcheng5", "xiangcheng3", "xiangcheng4", "xiangshan2", "xiangshan1", "xinhe1", "xinhe", "xinfeng", "xinfeng1", "xinyi1", "xinyi", "xinzhou", "xinzhou1", "xinzhou2", "yanbian1", "yancheng1", "yancheng", "yanling", "yanling1", "yanshan", "yanshan2", "yanshan3", "yangxin", "yangxin1", "yichuan1", "yichuan", "yichun", "yichun1", "yiwu1", "yiwu", "yixian", "yixian2", "yixian1", "yiyang", "yiyang1", "yiyang2", "yinzhou", "yinzhou1", "yingshan", "yingshan1", "yongji1", "yongji", "yongning", "yulin1", "yulin", "yushan1", "yushan", "yushu", "yutian1", "yutian", "yuzhong", "yuzhong1", "yucheng", "yucheng2", "yuxian1", "yuxian", "yuanjiang", "yuanyang1", "yuanyang", "yuncheng", "yuncheng2", "yuncheng1", "zhenan", "zhenan1", "zhenjiang", "zhenjiang1", "zhenping1", "zhenping", "zhenyuan", "zhenyuan2", "zhijiang", "zhongshan2", "zhongshan", "zhongshan1", "zhongshan", "ziyang1", "ziyang2", "ziyang", "qixia1", "qixia", };
    }
}